﻿<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
<link rel="stylesheet" href="css/swiper.min.css">
<!--Swiper3.0.4-->
<style>
* {
	margin: 0;
	padding: 0;
}
.blue-slide {
	background: #4390EE;
}
.red-slide {
	background: #CA4040;
}
.orange-slide {
	background: #FF8604;
}
.swiper-slide {
	line-height: 300px;
	color: #fff;
	font-size: 36px;
	text-align: center;
}
.swiper-button-prev{
	color:red !important;
}
</style>
</head>
<body>

<div class="swiper-container">
	<div class="swiper-wrapper">
		<div class="swiper-slide blue-slide">slider1</div>
		<div class="swiper-slide red-slide">slider2</div>
		<div class="swiper-slide orange-slide">slider3</div>
		<div class="swiper-slide red-slide">slider4</div>
		<div class="swiper-slide orange-slide">slider5</div>
	</div>
	<div class="swiper-button-prev"></div>
	<div class="swiper-button-next"></div>
</div>
<script src="../../src/lib/jquery.js"></script>
<script src="js/swiper.min.js"></script>
<script type="text/javascript">
	var mySwiper = new Swiper('.swiper-container',{
		loop: true,
		autoplay: 1000,
		speed:600,                        //间隔时间
		pagination: '.swiper-pagination', //分页
		paginationClickable: true,        //分页点
		spaceBetween:20,                  //分栏距离
		prevButton:'.swiper-button-prev',
		nextButton:'.swiper-button-next',
		//slidesPerView: 3,				  //分多少页(1)
		//slidesPerGroup:1,				  //几个为一组
		//autoHeight: true,               //高度随内容变化
		//direction : 'vertical',         //方向
		onInit: function(swiper){         //Swiper初始化
			//alert(swiper.activeIndex);提示Swiper的当前索引
		}
	});

	//鼠标Hover暂停
	$(".swiper-container").hover(function(){
		mySwiper.stopAutoplay()
	}, function() {
		mySwiper.startAutoplay()
	});
	//mySwiper.slideTo(0, 1000, false);//切换到第一个slide，速度为1秒
	console.log(mySwiper.activeIndex)
	setTimeout(function(){
		/*$('.swiper-container').css('width','600px')
		$('.swiper-wrapper').css('width','600px');
		$(".swiper-slide ").css('width','600px')*/
		console.log(mySwiper.params)
	},3000)
</script>

</body>
</html>
